package com.qhong.test.service;

import com.qhong.spring.annotation.Autowired;
import com.qhong.spring.annotation.stereotype.Service;
import com.qhong.test.dao.UserDAO;

/**
 * 一个普通的类，用于测试是否可以创建对象
 * @author ranger
 *
 */
@Service
public class UserService  {

	public UserService(){

	}

	@Autowired
	public  void setService(UserDAO userDAO) {
		System.out.println("3"+userDAO);

		this.userDAO = userDAO;
		this.userDAO.save();

	}

	private UserDAO userDAO;


	public void login(){
		System.out.println("-登录Service-");
		System.out.println(userDAO);
		this.userDAO.save();
	}

	public static void main(String[] args) {
		UserDAO uDAO=new UserDAO();
		UserService us=new UserService();
		us.login();
	}



}